package pattern.composite

/**
 * 分支和叶子节点的公用接口
 */
trait Component {
  protected val name:String

  def add(component: Component):Unit={
    throw new UnsupportedOperationException
  }
  def remove(component: Component): Unit ={
    throw new UnsupportedOperationException
  }
  def display(level:Int):Unit
}
